{{!--

 Copyright 2016 LinkedIn Corp.

 Licensed under the Apache License, Version 2.0 (the "License"); you may not
 use this file except in compliance with the License. You may obtain a copy of
 the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 License for the specific language governing permissions and limitations under
 the License.

--}}

<div class="nav-extension"></div>

<div class="container" role="main">

    <div class="bread-crumb flat">
        {{#link-to "dashboard"}}<i class="glyphicon glyphicon-home"></i>{{/link-to}}
        {{#link-to "workflow" (query-params workflowid=model.flowexecid)}}Workflow{{/link-to}}
        {{#link-to "job" (query-params jobid=model.jobexecid) class="active"}}<label>Job</label>{{/link-to}}
    </div>

    <div class="shadow details-container box">
        <h4>{{model.jobdisplayname}}</h4>
        <hr class="horizontal-line"/>
        <table class="info borderless">


            <tbody>
            <tr>
                <td>User</td>
                <td id="job_user">{{model.username}}</td>
            </tr>
            <tr>
                <td>Queue</td>
                <td id="job_queue">{{model.queue}}</td>
            </tr>
            <tr>
                <td>Jobtype</td>
                <td id="job_type">{{model.jobtype}}</td>
            </tr>
            <tr>
                <td>Start time</td>
                <td id="job_start_time">{{model.starttime}}</td>
            </tr>
            <tr>
                <td>End time</td>
                <td id="job_end_time">{{model.finishtime}}</td>
            </tr>
            </tbody>
        </table>
        <table class="info borderless">
            <tr>
                <td><a id="job_flow_history" class="btn"
                       href="./newflowhistory?flow-def-id={{urlEncode model.flowdefid}}&select-graph-type=resources"><span
                        class="glyphicon glyphicon-stats"></span> FlowHistory</a></td>
                <td><a id="job_flow_def_id" class="btn" href={{model.flowdefid}}><span
                        class="glyphicon glyphicon-info-sign"></span> Flow
                    definition</a></td>
                <td><a id="job_flow_exec_id" class="btn" href="{{model.flowexecid}}"><span
                        class="glyphicon glyphicon-cog"></span> Flow
                    execution</a></td>
            </tr>
            <tr>
                <td><a id="job_job_history" class="btn"
                       href="./newjobhistory?job-def-id={{urlEncode model.jobdefid}}&select-graph-type=resources"><span
                        class="glyphicon glyphicon-stats"></span> JobHistory</a></td>
                <td><a id="job_job_def_id" class="btn" href="{{model.jobdefid}}"><span
                        class="glyphicon glyphicon-info-sign"></span> Job
                    definition</a></td>
                <td><a id="job_job_exec_id" class="btn" href="{{model.jobexecid}}"><span
                        class="glyphicon glyphicon-cog"></span> Job
                    execution</a></td>
            </tr>
        </table>
        <table class="info borderless">
            <tbody>

            <tr>
                <td id="job_task_severity">
                    {{tasks-severity tasksseverity=model.tasksseverity}}
                </td>
            </tr>
            <tr>
                <td id="job_aggregated_metrics">
                    {{aggregated-metrics application=model}}
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <div class="shadow summary-list-container">
        <div class="summary-list-header">Applications</div>

        {{application-list applications=model.taskssummaries}}
    </div>

</div>
